#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <QMessageBox>
#include <QPropertyAnimation>
#include <QScrollBar>
#include <QCloseEvent>
#include <QTimer>
#include <QTime>
#include <QModelIndex>
#include <QWheelEvent>
#include <QVariant>
#include <QProgressBar>

#include "adress.h"

Q_DECLARE_METATYPE(Adress*)

#include "ui_mainwindow.h"
#include "keyboard.h"

#include "dialog_adress_manager.h"

#include "parcours.h"
#include "dialog_map.h"
#include "favorite.h"
#include "option.h"
#include "help.h"
#include "itinerary.h"


//Q_DECLARE_METATYPE( (QHash<int,Adress*>) )

enum search_state
{
    starting_continent
    ,starting_country
    ,starting_town
    ,starting_POI_name
    ,starting_way
    ,starting_numero
};

namespace Ui {
    class MainWindow;
}

class MainWindow : public QMainWindow
{
    Q_OBJECT

protected:

public:
    explicit MainWindow(QWidget *parent = 0);
    ~MainWindow();
    void closeEvent(QCloseEvent *event);
    void Show_Keyboard();
    Dialog_Map * dialog_Map;
    Option * widget_settings;
    Favorite * widget_favorites;
    Itinerary * widget_navigate;
    Help * widget_help;

private:
    Ui::MainWindow *ui;
    QTimer * timer_clock;
    void Init_All();
    Keyboard * keyboard;
    Dialog_Adress_Manager * Adress_Manager;

    void Hide_All_Widget();
    search_state state;

public slots:
    void Update_Time();
    void Change_Page_Navigate();
    void Change_Page_Favorites();
    void Change_Page_Help();
    void Change_Page_Settings();
    void Get_Keyboard();
    void Change_Language(QString lang);
    void Change_Theme(QString theme_name);
};

#endif // MAINWINDOW_H
